/*    */ package dm.jdbc.util;
/*    */ 
/*    */ import java.io.IOException;
/*    */ import java.io.InputStream;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class UtilBinaryToUnicodeInputStream
/*    */   extends InputStream
/*    */ {
/*    */   InputStream binaryInputStream;
/*    */   private int lastByteRead;
/*    */   private int nibbleReadPosition;
/*    */   
/*    */   public UtilBinaryToUnicodeInputStream(InputStream inputstream)
/*    */   {
/* 26 */     this.binaryInputStream = inputstream;
/* 27 */     this.lastByteRead = 0;
/* 28 */     this.nibbleReadPosition = 0;
/*    */   }
/*    */   
/*    */   public int read() throws IOException {
/* 32 */     int i = -1;
/* 33 */     if ((this.nibbleReadPosition == 0) && (this.lastByteRead != -1)) {
/* 34 */       this.lastByteRead = this.binaryInputStream.read();
/*    */     }
/* 36 */     if (this.lastByteRead != -1) {
/* 37 */       if (this.nibbleReadPosition == 0) {
/* 38 */         i = 0;
/* 39 */         this.nibbleReadPosition = 1;
/*    */       } else {
/* 41 */         i = this.lastByteRead & 0xFF;
/* 42 */         this.nibbleReadPosition = 0;
/*    */       }
/*    */     }
/* 45 */     return i;
/*    */   }
/*    */ }


/* Location:              D:\Program Files\DBMS_20150813\jdbc\Dm7JdbcDriver17.jar!\dm\jdbc\util\UtilBinaryToUnicodeInputStream.class
 * Java compiler version: 2 (46.0)
 * JD-Core Version:       0.7.1
 */